package com.numberone.master.modules.card.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.numberone.master.common.persistence.Page;
import com.numberone.master.common.service.CrudService;
import com.numberone.master.modules.card.entity.CardRechargeFlow;
import com.numberone.master.modules.card.dao.CardRechargeFlowDao;

/**
 * 流量卡充值流水Service
 * @author ck
 * @version 2018-07-12
 */
@Service
@Transactional(readOnly = true)
public class CardRechargeFlowService extends CrudService<CardRechargeFlowDao, CardRechargeFlow> {
	
	@Autowired
	private CardRechargeFlowDao cardRechargeFlowDao;

	public CardRechargeFlow get(String id) {
		return super.get(id);
	}
	
	@Transactional(readOnly = false)
	public void updatePayState(int state,String orderId){
		 cardRechargeFlowDao.updatePayState(state,orderId);
	}
	
	
	public CardRechargeFlow selectCardRechargeFlow(String orderId){
		return cardRechargeFlowDao.selectCardRechargeFlow(orderId);
	}
	
	public List<CardRechargeFlow> findList(CardRechargeFlow cardRechargeFlow) {
		return super.findList(cardRechargeFlow);
	}
	
	public Page<CardRechargeFlow> findPage(Page<CardRechargeFlow> page, CardRechargeFlow cardRechargeFlow) {
		return super.findPage(page, cardRechargeFlow);
	}
	
	@Transactional(readOnly = false)
	public void save(CardRechargeFlow cardRechargeFlow) {
		super.save(cardRechargeFlow);
	}

	@Transactional(readOnly = false)
	public void update(CardRechargeFlow cardRechargeFlow) {
		super.update(cardRechargeFlow);
	}
	
	@Transactional(readOnly = false)
	public void delete(CardRechargeFlow cardRechargeFlow) {
		super.delete(cardRechargeFlow);
	}
	
}